import { defineConfig } from 'vitepress';

const { DOCS_NODE_ENV } = process.env;

export default defineConfig({
  title: 'Dumbbell文档',
  base: DOCS_NODE_ENV === 'dev' ? '/' : '/stsc-docs/',
  themeConfig: {
    nav: [
      { text: '引导', link: '/guide/index', activeMatch: '/guide/' },
      { text: '配置', link: '/config/index', activeMatch: '/config/' },
      { text: 'Gitee', link: 'https://gitee.com/fan-tienan/dumbbell' },
    ],
    sidebar: {
      '/guide/': [
        {
          text: '引导',
          items: [
            {
              text: '为什么使用',
              link: '/guide/why',
            },
            {
              text: '开始',
              link: '/guide/index',
            },
            {
              text: 'Stsc源码调试',
              link: '/guide/dev',
            },
          ],
        },
      ],
      '/config/': [
        {
          text: '配置',
          items: [
            {
              text: '配置 Stsc',
              link: '/config/index',
            },
            {
              text: '脚手架参数',
              link: '/config/cli-argvs',
            },
            {
              text: '选项',
              link: '/config/options',
            },
          ],
        },
      ],
    },
  },
});
